package com.neoyr.meeting.service.Imp;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.neoyr.meeting.entity.User;
import com.neoyr.meeting.entity.UserDetail;
import com.neoyr.meeting.mapper.UserMapper;
import com.neoyr.meeting.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Transactional
@Service
public class UserImp extends ServiceImpl<UserMapper, User> implements UserService {
@Autowired
private UserDetailImp userDetailImp;
//用户签到
    @Override
public void saveUser(User user){
        boolean b = this.save(user);
        UserDetail userDetail = new UserDetail();
        userDetail.setUserId(user.getId());
        userDetail.setActiveId(1L);
        userDetailImp.save(userDetail);

    };
}
